package com.example.mallone11.Consumer.service.impl;

import com.example.mallone11.Consumer.mapper.ConsumerMapper;
import com.example.mallone11.Consumer.pojo.Consumer;
import com.example.mallone11.Consumer.service.ConsumerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ConsumerServiceImpl implements ConsumerService {
    @Resource
    private ConsumerMapper consumerMapper;

    @Override
    public int register(String account, String passwd) {
        //即将注册的账号是否已经被注册
        return consumerMapper.register(account,passwd);
    }

    @Override
    public Consumer login(String account, String passwd) {
        return consumerMapper.login(account,passwd);
    }

    @Override
    public Consumer findByAccount(String account) {
        return consumerMapper.findByAccount(account);
    }
}
